<template>
  <div class="gender">
    <div class="header"  @click="myinfo">
      <van-icon class="left" name="arrow-left" />
      <span>编辑性别</span>
      <button>保存</button>
    </div>
    <div class="n">
      <van-radio-group v-model="radio">
        <van-cell-group>
          <van-cell title="男" clickable @click="radio = '1'">
            <template #right-icon>
              <van-radio name="1" />
            </template>
          </van-cell>
          <van-cell title="女" clickable @click="radio = '2'">
            <template #right-icon>
              <van-radio name="2" />
            </template>
          </van-cell>
        </van-cell-group>
      </van-radio-group>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        radio: 1
      }
    },
    methods: {
      myinfo() {
        this.$router.push("/myinfo")
      },
    },
  }
</script>

<style lang="scss" scoped>
  .gender {
    background-color: #f9f9f9;
    height: 100vh;
  }
  .header {
    margin-top: 3.5vmin;
    height: 10vmin;
    margin-bottom: 15px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 5vmin;

    button {
      border: none;
      color: gray;
      margin-right: 5px;
    }
  }

  .van-cell__title {
    font-size: 4.5vmin;
  }
</style>